﻿using WebServiceMGI;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ComunesMGI.DataTypes;
using System.Collections.Generic;

namespace TestWebServiceMGI
{
    
    
    /// <summary>
    ///This is a test class for IMGIClientesSistemasWSTest and is intended
    ///to contain all IMGIClientesSistemasWSTest Unit Tests
    ///</summary>
    [TestClass()]
    public class IMGIClientesSistemasWSTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for GetSistemas
        ///</summary>
        [TestMethod()]
        public void GetSistemasTest()
        {
            IMGIClientesSistemasWS target = CreateIMGIClientesSistemasWS(); // TODO: Initialize to an appropriate value
            int cliCod = 1; // TODO: Initialize to an appropriate value
            List<DataSistema> expected = new List<DataSistema>(); // TODO: Initialize to an appropriate value
            expected.Add(new DataSistema(cliCod, "IC-Banking", "http://localhost/pis2008/mgi"));
            List<DataSistema> actual;
            actual = target.GetSistemas(cliCod);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetClientes
        ///</summary>
        [TestMethod()]
        public void GetClientesTest()
        {
            IMGIClientesSistemasWS target = CreateIMGIClientesSistemasWS(); // TODO: Initialize to an appropriate value
            List<DataCliente> expected = new List<DataCliente>(); // TODO: Initialize to an appropriate value
            expected.Add(new DataCliente("BSCH"));
            List<DataCliente> actual;
            actual = target.GetClientes();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        internal virtual IMGIClientesSistemasWS CreateIMGIClientesSistemasWS()
        {
            // TODO: Instantiate an appropriate concrete class.
            IMGIClientesSistemasWS target = new MGIClientesSistemasWS();
            return target;
        }

        /// <summary>
        ///A test for AddCliente
        ///</summary>
        [TestMethod()]
        public void AddClienteTest()
        {
            IMGIClientesSistemasWS target = CreateIMGIClientesSistemasWS(); // TODO: Initialize to an appropriate value
            DataCliente cli = new DataCliente("cliente2"); // TODO: Initialize to an appropriate value
            target.AddCliente(cli);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
